package com.bwie.xujiahaonewstitle.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.bwie.newstitlexujiahao.R;


/**
 * 项目名称
 * 类描述：
 * 创建人：${徐家浩}
 * 创建时间：2017/2/19 19:00
 * 修改人：${徐家浩}
 * 修改备注：
 */
public class MeFragmentAdapter extends BaseAdapter{
    private Context mContext;
    private String[] s;

    public  MeFragmentAdapter(Context context,String[] s){
        this.mContext = context;
        this.s = s;
    }

    @Override
    public int getCount() {
        return s.length;
    }

    @Override
    public Object getItem(int i) {
        return null;
    }

    @Override
    public long getItemId(int i) {
        return 0;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {

        if (view==null){
            view = View.inflate(mContext, R.layout.fragmentmy_lv_item,null);
        }

        TextView lv_item_tv = (TextView) view.findViewById(R.id.lv_item_tv);

        lv_item_tv.setText(s[i]);

        return view;
    }
}
